﻿

Public Class cHost
    Public Host As String = "127.0.0.1"
    Public Port As UInt32 = 3306
    Public User As String = "root"
    Public Password As String = ""
    Public isTested As Boolean
    '
    Public Function isValid() As Boolean
        If String.IsNullOrWhiteSpace(Host) Then Return False
        If String.IsNullOrWhiteSpace(User) Then Return False
        If String.IsNullOrWhiteSpace(Password) Then Return False
        If Port < 1034 Or Port > 65535 Then Return False
        If Host.Length < 4 Then Return False
        If User.Length < 4 Then Return False
        If Password.Length < 4 Then Return False
        If InStr(Host, ".") = 0 Then Return False
        Return True
    End Function

End Class
